package com.leo.component;

import com.almasb.fxgl.dsl.components.RechargeableIntComponent;
import com.leo.common.Config;

/**
 * 坦克等级组件，继承范围组件
 */
public class TankLevelComponent extends RechargeableIntComponent {

    public TankLevelComponent() {
        super(Config.TANK_MAX_LEVEL, Config.TANK_INIT_LEVEL);
    }

    /**
     * 升级
     */
    public void upgrade() {
        restore(1);
    }

    /**
     * 降级
     */
    public void downgrade() {
        damage(1);
    }

    /**
     * 满级
     */
    public void gradeFull() {
        restoreFully();
    }
}
